package ro.gillardon.business.priceservice;

import ro.gillardon.business.exception.BusinessException;
import ro.gillardon.commons.Conditions;
import ro.gillardon.commons.OfferDetails;
import ro.gillardon.commons.Offers;

/**
 * Interface which specifies the skeleton of all the offer services.
 *
 * @author davidl
 */
@FunctionalInterface
public interface PriceService<T extends OfferDetails> {

  /**
   * Gets all the offers for the given conditions.
   *
   * @param conditions specific conditions for a specific booking (plane, train, hotel...)
   * @return all the offers for the current conditions
   * @throws BusinessException in case of error
   */
  Offers<T> getOffers(Conditions conditions) throws BusinessException;
}
